class AdminController < ApplicationController

  def list_all_categories
    @categories = Category.find(:all)
    
  end

  def get_category
    @category = Category.find(params[:id])
  end

  def get_cate_by_name
    @categories = Category.find_all_by_name(:all, params[:name])
  end

  def cate_products
    @products = Category.find(params[:id]).products
  end

end
